package com.javabi.sizeof.definition;

import java.io.PrintStream;
import java.util.Set;

import com.javabi.sizeof.ClassDefinition;
import com.javabi.sizeof.ClassDefinitionMap;

/**
 * An Ignore Definition.
 */
public final class IgnoreDefinition<T> extends ClassDefinition<T> {

	@Override
	public long sizeOf(T instance) {
		return 0;
	}

	@Override
	public long sizeOfDebug(T instance, ClassDefinitionMap definitionMap, Set<Object> instanceSet, PrintStream stream) throws IllegalAccessException {
		stream.println("ignore " + instance.getClass().getSimpleName() + " 0 bytes");
		return 0;
	}
}
